package com.inmaytide.website.servlet;

import com.inmaytide.website.utils.configurations.SystemConstants;

import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;

/**
 * Servlet implementation class InitServlet
 */
@WebServlet(name = "InitServlet", urlPatterns = {"/InitServlet"}, loadOnStartup = 2)
public class InitServlet extends HttpServlet {

    private static final long serialVersionUID = 1L;

    @Override
    public void init(ServletConfig config) throws ServletException {
        ServletContext context = config.getServletContext();
        context.setAttribute("PROJECT_NAME", SystemConstants.PROJECT_NAME);
        context.setAttribute("BASE", context.getContextPath());
    }


}
